/**
 * 
 */
package timingAttack;

import java.io.UnsupportedEncodingException;
import java.math.BigInteger;

/**
 * Do some tests to understand how various functions work
 * 
 * @author Vincent
 *
 */
public class Testing 
{

	/**
	 * @param args
	 * @throws UnsupportedEncodingException 
	 */
	public static void main(String[] args) throws UnsupportedEncodingException 
	{
		// Why doesn't new String(byte [], "UTF-8") work?
		System.out.println(new String( new byte [] { 0x30, 0x31, 0x32 }, "UTF-8"));
		
		
		// BigIntegers are immutable!
		BigInteger i = new BigInteger("0");
		
		i = i.setBit(0);
		i = i.setBit(1);
		i = i.setBit(10);
		
		System.out.println("i = " + i.toString(2));
		System.out.println("i = " + i);
		System.out.println("i.bitLength() = " + i.bitLength());
	}

}
